<template>
  <q-empty
    v-if="!list || !list.length"
    :text="!list ? '加载中...' : '暂无记录'"
  ></q-empty>
  <view v-else>
    <view class="pa-3 u-border-bottom" v-for="it in list" :key="it.id">
      <view class="al-c">
        <span>充值{{ it.pay_amt / 100 }}元</span>
        <span class="fz-14 op-6 ml-2">+{{ it.coin }}积分</span>
        <span
          class="ml-auto fz-14"
          :class="it.status == 1 ? 'suc-1' : 'red-1'"
          >{{ it._status }}</span
        >
      </view>
      <view class="op-4 fz-12 mt-1">{{ it._updatedAt }}</view>
    </view>

    <view class="pa-4 ta-c fz-14">
      <u-loading-icon v-if="loading == 2" />
      <span class="op-4" v-else-if="total > 6"> 共{{ total }}条记录 </span>
    </view>
    <u-safe-bottom />
  </view>
</template>

<script>
import mixin from "./list-mixin";

export default {
  mixins: [mixin],
  data() {
    return {
      listApi: "/coin/auth/pay-log",
    };
  },
  onLoad() {
    this.getList();
  },
};
</script>
